# Config file for statismo package

# Compute paths
get_filename_component( statismo_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH )
set( statismo_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@" )

# Our library dependencies (contains definitions for IMPORTED targets)
if(NOT TARGET statismo_core AND NOT statismo_BINARY_DIR)
  include("${statismo_CMAKE_DIR}/statismoTargets.cmake")
endif()

set( Boost_INCLUDE_DIR @Boost_INCLUDE_DIR@ )
set( Boost_LIBRARY_DIRS @Boost_LIBRARY_DIRS@ )
set( Boost_LIBRARIES @Boost_LIBRARIES@ )
add_definitions( -DBOOST_THREAD_VERSION=3 )
add_definitions( -DBOOST_FILESYSTEM_VERSION=3 )

set( HDF5_DIR @HDF5_DIR@ )
set( HDF5_INCLUDE_DIRS @HDF5_INCLUDE_DIRS@ )
set( HDF5_LIBRARIES @HDF5_LIBRARIES@ )

set( EIGEN3_INCLUDE_DIR @EIGEN3_INCLUDE_DIR@ )

include_directories(
  ${statismo_INCLUDE_DIRS}
  ${Boost_INCLUDE_DIR}
  ${HDF5_INCLUDE_DIRS}
  ${EIGEN3_INCLUDE_DIR}
)

link_directories( ${Boost_LIBRARY_DIRS} )

set( VTK_SUPPORT @VTK_SUPPORT@ )
set( ITK_SUPPORT @ITK_SUPPORT@ )

if( VTK_SUPPORT )
  set( VTK_DIR @VTK_DIR@ )
  find_package( VTK )
endif()

if( ITK_SUPPORT )
  set( ITK_DIR @ITK_DIR@ )
  find_package( ITK )
endif()

set( statismo_LIBRARIES "@statismo_LIBRARIES@" )

if(MSVC11) #i.e. Visual Studio 2012 
  # Fix for VS2012 that has _VARIADIC_MAX set to 5. Don't set too high because it increases compiler memory usage / compile-time.
  add_definitions( -D_VARIADIC_MAX=10 )
  # Fix for another VS2012 problem: not all TR1 options are automatically detected, therefore we force them here.
  add_definitions( -D BOOST_HAS_TR1 )
  add_definitions( -D BOOST_NO_0X_HDR_INITIALIZER_LIST )
endif()

